$--border-color: #dfdfdf;
$--sql-title-height: 60px;
$--line-top-bottom-position: 30%;
$--line-left-right-position: 15px;

.page-sql {
  width: 100%;
  height: 100%;
  // display: flex;
  min-height: 80%;
  background-color: #ffffff;
  // border: 1px solid $--border-color;
  border-radius: 4px;

  // margin-bottom: 10px !important;
  .dataSourceTitle {
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.75);
    height: 30px;
    line-height: 30px;
  }

  .sql {
    width: 100%;
    height: 100%;
    // padding: 15px;
    padding-bottom: 0;

    &-item {
      border-radius: 4px;
      width: 100%;
      height: 100%;
      box-sizing: border-box;
      margin-bottom: 10px;

      &-title {
        padding: 10px;
        position: relative;
        border-radius: 4px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        &-name {
          font-size: 14px;
          font-weight: 500;
          color: #138DC7;
        }

        &-more {
          img {
            width: 16px;
            height: 16px;
            cursor: pointer;
          }
        }
      }

      &-content {
        padding-top: 10px;
        padding-left: 20px;
        width: 100%;
        // height: calc(100% - #{$--sql-title-height});
        overflow: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
      }

      &-block {
        width: 100%;
        height: 100%;
        // margin-bottom: 15px;
      }

      &-block:last-child {
        margin-bottom: 0;
      }
    }


  }

  .sql-item-title {
    border: 0;
    background: #FFFFFF;
    box-shadow: 1px 2px 8px -1px rgba(158, 158, 158, 0.15);
    border-radius: 2px;
    border: 1px solid rgba(19, 141, 199, 0.02);
  }

  .sql-item-content {
    .sql-item-block {
      position: relative;
    }

    .sql-item-block::after {
      content: '';
      border-right: 1px solid #138DC7;
      width: 15px;
      height: 11px;
      position: absolute;
      left: -14px;
      top: 10px;
      z-index: 1;
    }
  }

  .sql-item-title::before {
    border-top: 1px dashed #138DC7;
  }

  .sql-item-title::after {
    border-left: 1px dashed #138DC7;
  }

  .sql>.sql-item>.sql-item-title {
    border: 0;
    background: #E6F7FF;
    box-shadow: 1px 2px 8px -1px rgba(158, 158, 158, 0.15);
    border-radius: 2px;
    border: 1px solid rgba(19, 141, 199, 0.02);
    height: 48px;
    background-color: rgba(230, 247, 255, 1);

    &::before {
      display: none;
    }

    &::after {
      display: none;
    }
  }
}

.sql-item-title-more-btn {
  display: flex;
  flex-direction: column;

  .action-btn {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    .text {
      font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",  Arial, sans-serif;
    }

    &:hover {
      &.el-icon-edit {
        color: #17B3A3;
      }

      &.el-icon-plus {
        color: #17B3A3;
      }

      &.el-icon-delete {
        color: #F56C6C;
        // background: rgba(245, 108, 108, 0.1);
      }

      &.el-icon-copy-document {
        color: #17B3A3;
      }
    }
  }
}